#ifndef __WM6201_H__
#define __WM6201_H__
#include "stm32f4xx.h"
#include "stdbool.h"
#define WM6201_UART    &uart_1

#define wm6201_send(buf,len)                     uart_send(WM6201_UART,buf, len)
#define wm6201_send_fmt(fmt,...)                 uart_printf(WM6201_UART,fmt,__VA_ARGS__)
#define wm6201_get_cmd_ack_pcket(buf,cnt_p,max_read)        uart_get_one_rx_timeout_pcket(WM6201_UART,buf,cnt_p,max_read)      


void wm6201_init(void);
void wm6201_hard_reset(void);
bool wm6201_enter_cmd_mode(void);
int wm6201_send_cmd(u8 *cmd,u8 cmd_len,char *expt_ret_value,u8 *real_ret_value,u32 *ret_value_len,u32 wait_ms);
#endif
















